/*
 * @Author: humengchuan 531537052@qq.com
 * @Date: 2024-12-09 12:40:04
 * @LastEditors: humengchuan 531537052@qq.com
 * @LastEditTime: 2024-12-11 13:34:29
 * @FilePath: \project-my\nuxt3-app-pro\nuxt.config.ts
 * @Description: 
 */
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: '2024-11-01',
  devtools: { enabled: true },
  // ssr: true,
  spaLoadingTemplate: 'spa-loading-template.html',
  modules: ['@element-plus/nuxt', '@nuxtjs/i18n'],
  app: {
    pageTransition: { name: 'page', mode: 'out-in' },// 页面切换动画
    head: { 
      // 页面头部信息
      title: 'Nuxt3 Admin',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        { name: 'description', content: 'Nuxt3 Admin' },
        { name: 'keywords', content: 'Nuxt3 Admin, 前端, vue3' },
      ],
    },
  },
  i18n: {
    // 语言包
    locales:["en", "zh"],
    defaultLocale: 'zh',
    strategy: 'prefix_except_default',
    vueI18n: './locales/i18n.config.ts'
  },
  css: [
    // 全局样式
    '@/assets/styles/reset.scss'
  ],
  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          api: 'modern-compiler'
        }
      }
    }
  },
  build: {

  },
  $development: {
    // 开发环境配置
  },
  $production: {
    // 生产环境配置
  }
})